package cn.edu.dgut.css.springboottestthree.controller;

import cn.edu.dgut.css.springboottestthree.dao.RegionDao;
import cn.edu.dgut.css.springboottestthree.result.AjaxResult;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * @date: 2020/11/19 11:13
 * @author: ZkhEight
 */
@RestController
public class RegionJsonController {

    @Resource
    private RegionDao regionDao;

    @GetMapping("json-data")
    public AjaxResult getData() throws IOException {
        return AjaxResult.success(regionDao.getData());
    }
}
